<!--
 * @Author: 李天惊 uf_lee@163.com
 * @Date: 2022-08-24 13:22:19
 * @LastEditors: 李小晴 2689279066@qq.com
 * @LastEditTime: 2023-08-25 13:29:20
 * @FilePath: \ahbs\uc_sys\src\views\System\App\components\See.vue
 * Copyright (c) 2022 by 李天惊 uf_lee@163.com, All Rights Reserved. 
-->
<script setup lang="ts">
import { PropType, watch, reactive } from 'vue'
import { Descriptions } from '@/components/Descriptions'
import { ElTag } from 'element-plus'
const props = defineProps({
  addFolder: {
    type: Object as PropType<Nullable<any>>,
    default: () => null
  }
})
const schema = reactive<DescriptionsSchema[]>([
  {
    field: 'id',
    label: '主键'
  },
  {
    field: 'name',
    label: '文件夹名称'
  },
  {
    field: 'belong_type',
    label: '所属类型'
  },
  {
    field: 'create_user_name',
    label: '创建人'
  },
  {
    field: 'create_time',
    label: '创建时间'
  }
])

watch(
  () => props.addFolder,
  (val: any) => {
    if (!val) return
  },
  {
    deep: true,
    immediate: true
  }
)
</script>

<template>
  <Descriptions :schema="schema" :data="addFolder || {}">
    <template #belong_type>
      <ElTag type="success"> 文件夹 </ElTag>
    </template>
  </Descriptions>
</template>
